package com.job.shuang.HomeWork0705;

/**
 * @author liushuang
 * @version 1.0
 * @since 2022-07-06 07:54:56
 */
public class STN0705 {
    public static void main(String[] args) {
        STN0705.stn2(4,7,9);
    }
    public  static void stn2(int s,int t,int n){
        int num = s;
        int[][] arr = new int[n][n];
        for (int col = n-1; col >=0; col--) {
            for (int row = 0; row <= col; row++) {
                arr[row][col] = num;
                num++;
                num = num > t + 1 ? 1 : num;
            }
        }
        for (int col = 0; col < n; col++){
            for (int row = 0; row < n ; row++){
                if (row<col){
                    System.out.print("\t");
                }else{
                    System.out.print(arr[col][row]+"\t");
                }
            }
            System.out.println();
        }
    }
}
